// @ts-ignore
/* eslint-disable */
import { api } from "@/utils/api";

/** 新增生产-交接班数据 POST /proShiftHandover/add */
export async function proShiftHandoverAdd(
  body: BIZAPI.ProShiftHandoverCreateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proShiftHandoverAdd(
  body: BIZAPI.ProShiftHandoverCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proShiftHandoverAdd(
  body: BIZAPI.ProShiftHandoverCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proShiftHandoverAdd(
  body: BIZAPI.ProShiftHandoverCreateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proShiftHandover/add`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proShiftHandover/add`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除生产-交接班数据 POST /proShiftHandover/delete */
export async function proShiftHandoverDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proShiftHandoverDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proShiftHandoverDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proShiftHandoverDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proShiftHandover/delete`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proShiftHandover/delete`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取生产-交接班数据 POST /proShiftHandover/get */
export async function proShiftHandoverGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultProShiftHandoverEntity>;

export async function proShiftHandoverGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultProShiftHandoverEntity>>;

export async function proShiftHandoverGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultProShiftHandoverEntity>;

export async function proShiftHandoverGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultProShiftHandoverEntity>(
      `/app/proShiftHandover/get`,
      {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
        tupleResponse: true,
      }
    );
  }

  return api<BIZAPI.IResultProShiftHandoverEntity>(
    `/app/proShiftHandover/get`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 获取生产-交接班分页数据 POST /proShiftHandover/page */
export async function proShiftHandoverPage(
  body: BIZAPI.ProShiftHandoverQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageProShiftHandoverEntity>;

export async function proShiftHandoverPage(
  body: BIZAPI.ProShiftHandoverQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageProShiftHandoverEntity>>;

export async function proShiftHandoverPage(
  body: BIZAPI.ProShiftHandoverQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageProShiftHandoverEntity>;

export async function proShiftHandoverPage(
  body: BIZAPI.ProShiftHandoverQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageProShiftHandoverEntity>(
      `/app/proShiftHandover/page`,
      {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
        tupleResponse: true,
      }
    );
  }

  return api<BIZAPI.IResultIPageProShiftHandoverEntity>(
    `/app/proShiftHandover/page`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 更新生产-交接班数据 POST /proShiftHandover/update */
export async function proShiftHandoverUpdate(
  body: BIZAPI.ProShiftHandoverUpdateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proShiftHandoverUpdate(
  body: BIZAPI.ProShiftHandoverUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proShiftHandoverUpdate(
  body: BIZAPI.ProShiftHandoverUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proShiftHandoverUpdate(
  body: BIZAPI.ProShiftHandoverUpdateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proShiftHandover/update`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proShiftHandover/update`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
